package com.zyn.qianwen.user.util;

import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;

import java.text.SimpleDateFormat;
import java.util.Date;

public class CommonsUtils {

	
	public static String getCurrentDate() {
		String format = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
		return format;
	}
	
	public static String getCurrentDateTime() {
		String format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
		return format;
	}
	public static String getNextMonth(int i) {
		DateTime offset = DateUtil.offset(new Date(), DateField.MONTH, i);
		return new SimpleDateFormat("yyyy-MM").format(offset);
	}

	public static String getCurrentMonth(){
		return new SimpleDateFormat("yyyy-MM").format(new Date());
	}


}